package com.jyx.chain.web;

import com.jyx.chain.web.face.FaceFilter;
import com.jyx.chain.web.filterchain.FilterChain;
import com.jyx.chain.web.html.HtmlFilter;
import com.jyx.chain.web.request.Request;
import com.jyx.chain.web.response.Response;
import com.jyx.chain.web.service.ServiceFilter;

public class Test {

	public static void main(String[] args) {
		String msg = "大家好:),<script>,敏感，被就业，网络授课没感觉，因为看不见大伙</script>";
		Request req = new Request();
		req.setRequestStr(msg);
		Response resp = new Response();
		resp.setResponseStr("response");
		
		FilterChain fc = new FilterChain();
		fc.addFilter(new HtmlFilter())
			.addFilter(new FaceFilter())
			.addFilter(new ServiceFilter());
		fc.doFilter(req, resp,fc);
		System.out.println(req.getRequestStr());
		System.out.println(resp.getResponseStr());
	}

}
